package com.battle.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.battle.pojo.enums.OrganizationTypeEnum;
import jakarta.persistence.Entity;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import javax.persistence.Column;

/**
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2024/8/22 14:33
 */

@Data
@TableName(value = "ORGANIZATION",autoResultMap = true)
@Entity(name = "ORGANIZATION")
@AccEntity(value = "组织架构", type = EntityType.SERVICE_ENTITY)
public class Organization extends DomainBaseEntity<Organization> {

    /**
     * 名称
     */
    @Column(length = 50,
            nullable = false)
    private String name;

    /**
     * 编号
     */
    @Column(length = 255)
    private String code;

    /**
     * 上级id
     */
    @Column(nullable = false)
    private Long parentId;

    /**
     * 类型
     */
    @Column(nullable = false)
    private OrganizationTypeEnum type;

}
